package ex.util.generator;

import ex.vo.User;

import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class FakeUser {

	public List<User> getUserLists() throws NoSuchAlgorithmException{
		List<User> list = new ArrayList<User>();
		Random random = SecureRandom.getInstanceStrong();
		for (int i=1 ;i<1000; i++) {
			String url = "/goods/"+i;
			int userId = random.nextInt(10);
			User user = new User();
			user.setUserId(userId);
			user.setUrl(url);
			user.setName("name"+userId);
			user.setTimestamp(System.currentTimeMillis()+ 1000L*i);
			System.out.println(user.toString());
			list.add(user);		
		}

		return list;
	}
}
